#include "workerthread.h"
#include<QDebug>
workerthread::workerthread(QObject *parent) : QThread(parent)
{
    flags=true;
}

workerthread::~workerthread()
{

}

void workerthread::receiveSlot(bool flags1)
{
    flags=flags1;
}

void workerthread::run()
{

    while(flags)
    {
        for(int i=0;i<=5;i++)
        {
            qDebug()<<i<<i<<i<<i;
        }
         QThread::msleep(1000); // 延时以避免过快输出
    }
}
